All Questions
4 questions
3votes
1answer
2kviews
Optimizing Recursion in Knight's Tour
I'm trying to write a program for a university project. It should count all possible open tours (i.e. the start and end fields are not the same) recursively on a chessboard depending on board size and ...
2votes
1answer
2kviews
Knight's tour code
Another one for some late night snack. - Knight's tour! Please provide your suggestions/flaws/optimization to this knight's tour backtracking code.. ...
5votes
2answers
3kviews
Knight's Tour with Heuristics
When someone suggested that I solve Knight's Tour, I did so with heuristics and recursion. It takes a lot of time to solve even a 8x8 board: N-A1 N-C2 N-E1 ... N-E6 N-F4 Time used to solve: 5417011 ...
15votes
3answers
3kviews
N-Queens - Brute force - bit by bit
A discussion in The 2nd Monitor made me realize I had never 'solved' the N-Queens problem. Additionally, as I read up on it, I realized that the 64-squares in a chess board would work well if ...